package com.zhxt.system.service.impl;

import com.zhxt.system.domain.ZhxtContent;
import com.zhxt.system.mapper.ZhxtContentMapper;
import com.zhxt.system.service.IZhxtContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 内容操作 服务处理层
 */
@Service
public class ZhxtContentServiceImpl implements IZhxtContentService {
    @Autowired
    private ZhxtContentMapper zhxtContentMapper;
    /**
     * 查询内容列表
     */
    @Override
    public List<ZhxtContent> getContentList(ZhxtContent zhxtContent){
        return zhxtContentMapper.getContentList(zhxtContent);
    }

    /**
     * 查询内容详情
     */
    @Override
    public Map getContentMsg(Long nrid){
        return zhxtContentMapper.getContentMsg(nrid);
    }

    /**
     * 新增内容
     */
    public int addContent(ZhxtContent zhxtContent){
        return zhxtContentMapper.addContent(zhxtContent);
    }

    /**
     * 修改内容
     */
    public int updateContent(ZhxtContent zhxtContent){
        return zhxtContentMapper.updateContent(zhxtContent);
    }

    /**
     * 删除内容
     */
    public int delContent(ZhxtContent zhxtContent){
        return zhxtContentMapper.delContent(zhxtContent);
    }
}
